import tensorflow as tf

def demo():
    #计算变量的和
    a=10
    b=20
    c=a+b
    print('原生python计算的和', c)
    a_t = tf.constant(10)
    b_t = tf.constant(20)
    c_t = a_t+b_t
    print('tensorflow计算两数之和', c_t)
    with tf.Session() as sess:
        c_t_value = sess.run(c_t)
        print('c_t_value:', c_t_value)


if __name__ == '__main__':
    demo()